#ifndef DIGITALCLOCK_H
#define DIGITALCLOCK_H
#include <QLCDNumber>

class DigitalClock : public QLCDNumber
{
    Q_OBJECT
public:
    DigitalClock(QWidget* parent=0);
protected:
    void mousePressEvent(QMouseEvent* event);    //鼠标按下事件
    void mouseMoveEvent(QMouseEvent* event);      //鼠标移动事件
private slots:
    void showTime();       //显示当前时间
private:
    QPoint m_dragPosition;   //保存鼠标点相对电子钟表窗体左上角的偏移值
    bool m_showColon;     //钟表显示“：”
};

#endif // DIGITALCLOCK_H
